package lab02.test19;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {

        String result;
        //从键盘输入数据
        Scanner scanner = new Scanner(System.in);
        String string = scanner.next();
        for(int i = (string.length()-1);i >= 0;i--) {
            char temp = string.charAt(i);
            if (temp >= 'A' && temp <= 'Z') {
                System.out.print((char) (temp+32));
            } else if (temp >= 'a' && temp <= 'z') {
                System.out.print((char) (temp - 32));
            }
        }
    }
}
